﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;
using Telerik.Web.UI;
using System.Configuration;

namespace website.ar.UserControls
{
    public partial class UC_CompanyLogo : System.Web.UI.UserControl
    {
        protected string returnValue;

        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void fileUploadLogo_UploadedComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
        {
            string tempFilePath = Session["FilePath"] != null ? Session["FilePath"].ToString() : string.Format(@"{0}{1}.{2}", ConfigurationManager.AppSettings["TempFolderPath"], Guid.NewGuid().ToString(), e.FileName.Split('.')[1]);
            Session["FilePath"] = tempFilePath; ;
            fileUploadLogo.SaveAs(Server.MapPath(tempFilePath));
            
        }
    }
}